package com.sumainfor.pc.gmio.controller.director;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.gmio.service.DiChargesDeptService;
import com.sumainfor.pc.gmio.service.DiForceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 *查询各个地区的收费标准
 */
@RestController
@RequestMapping("/director/DiChargesDept")
public class DiChargesDeptController implements Serializable {
    @Autowired
    private DiChargesDeptService diChargesDeptService;

    /**
     *查询房源的水电燃收费标准
     */
    @GetMapping("/getChargesDept")
    public JsonResult getChargesDept(@RequestParam Map<String,Object> params){
        JsonResult result=new JsonResult();
        Map<String,Object> map=diChargesDeptService.getChargesDept(params);
        if (map!=null){
            result.put(map);
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }
    /**
     *租客端统计智能电表余额的时候查询房源对应的收费标准
     */
    @PostMapping("/key/getRdChargesDeptList")
    public JsonResult getRdChargesDeptList(@RequestBody Map<String,Object> params){
        return diChargesDeptService.getRdChargesDeptList(params);

    }

}
